package com.thtfpc.stroke.screening.controller;


import com.thtfpc.stroke.screening.bean.*;
import com.thtfpc.stroke.screening.bean.comm.CommResponse;
import com.thtfpc.stroke.screening.model.*;
import com.thtfpc.stroke.screening.service.MedScreeningService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping({"/screening/api"})
public class ScreeningController {

    @Autowired
    private MedScreeningService medScreeningService ;


    @ApiOperation(value = "记录患者基本信息", notes = "记录患者基本信息")
    @RequestMapping(value = {"/recordBaseInfo"}, method = {RequestMethod.POST})
    @ResponseBody
    public CommResponse<MedScreeningInfo> recordBaseInfo(@RequestBody MedScreeningInfoReq req){
        return new CommResponse<>(medScreeningService.recordBaseInfo(req));
    }


    @ApiOperation(value = "记录临床信息", notes = "记录临床信息")
    @RequestMapping(value = {"/recordClinics"}, method = {RequestMethod.POST})
    @ResponseBody
    public CommResponse<MedScreeningClinical> recordClinic(@RequestBody MedScreeningClinicalReq req){
        return new CommResponse<>(medScreeningService.recordClinic(req));
    }


    @ApiOperation(value = "记录辅助检查", notes = "记录辅助检查")
    @RequestMapping(value = {"/recordAuxiliary"}, method = {RequestMethod.POST})
    @ResponseBody
    public CommResponse<MedScreeningAuxiliary> recordAuxiliary(@RequestBody MedScreeningAuxiliaryReq req){
        return new CommResponse<>(medScreeningService.recordAuxiliary(req));
    }



    @ApiOperation(value = "记录治疗信息", notes = "记录治疗信息")
    @RequestMapping(value = {"/recordTreatment"}, method = {RequestMethod.POST})
    @ResponseBody
    public CommResponse<MedScreeningTreatment> recordTreatment(@RequestBody MedScreeningTreatmentReq req){

        return new CommResponse<>(medScreeningService.recordTreatment(req));
    }




    @ApiOperation(value = "记录转归信息", notes = "记录转归信息")
    @RequestMapping(value = {"/recordPrognosis"}, method = {RequestMethod.POST})
    @ResponseBody
    public CommResponse<MedScreeningPrognosis> recordPrognosis(@RequestBody MedScreeningPrognosisReq req){
        return new CommResponse<>(medScreeningService.recordPrognosis(req));

    }





}


